#ifndef CONTROLLER_H
#define CONTROLLER_H

#include <QObject>

// 封装计数器和退出逻辑
class Controller : public QObject
{
    Q_OBJECT
public:
    explicit Controller(int totalTasks, QObject *parent = nullptr);

    void notifyTaskFinish();

signals:
    void allTasksFinished();

private:
    int m_totalTasks;
    int m_count;

};

#endif // CONTROLLER_H
